physics_particle_set_damping

Set the damping value for all particles in a physics simulation.

语法:

physics_particle_set_damping(damping)


参数 描述
damping The linear damping to be applied to the particle fixture.


返回: N/A(无返回值)


描述

With this function you can set the linear damping of particles in the simulation. Damping is used to reduce the physics simulation velocity of instances over time, much like air resistance in the real world. This function is global in scope, in that it will change the damping not just for new particles created after the change, but also for those already present in the simulation.


例如:

physics_particle_set_radius(15);
physics_particle_set_density(0.5);
physics_particle_set_damping(1);
physics_particle_set_gravity_scale(1);

The above code will set the base properties for all particles in the simulation.


上一页: Soft Body Particles
下一页: physics_particle_set_gravity_scale
© Copyright YoYo Games Ltd. 2018 All Rights Reserved